package com.cheng.example.excel.easyexcel.extotab.chap01;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelReader;

import java.util.List;

/**
 * excel转为创建表语句工具类
 */
public class CreateUtil {


    public static void main(String[] args) {
        String path = "C:\\Users\\cheng\\Desktop\\新建文件夹\\要创建的类.xlsx";

        //
//        FileInputStream inp = new FileInputStream(path);
////        HSSFWorkbook wb = new HSSFWorkbook(inp);
////        HSSFSheet sheet = wb.getSheetAt(2); // 获得第三个工作薄(2008工作薄)

        ExcelReader excelReader = EasyExcel.read(path).build();


        //判断有几个sheet
        List<ColEntity> colEntities = EasyExcel.read(path).head(ColEntity.class).sheet().headRowNumber(2).doReadSync();
        System.out.println(colEntities.size());
    }




    public String createtring(List<ColEntity> list) {
        return null ;
    }


}
